package testPackageInfoJava;

import java.lang.annotation.Annotation;

public class Client {
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String pkgName = "testPackageInfoJava";
		Package pkg = Package.getPackage(pkgName);
		//获得包上的注解  
        Annotation[] annotations = pkg.getAnnotations();
        //遍历注解数组
        for(Annotation an:annotations){
        	System.out.println(an.toString());
        	if(an instanceof PkgAnnotation){
        		System.out.println("Hi,I'm the PkgAnnotation");
        	}
        }
        System.gc();
	}

}
